﻿Imports Fu3DEngine
Public Class frm3DMap

    Private Sub frm3DMap_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load



        FuEngine.GetEngine().InitEngine()
        Dim ts As TerrainScene = New TerrainScene("terrainsecene")
        ts.InitScene(RenderWindowControl1)
        FuEngine.GetEngine().AddScene(ts)


        'TerrainData td = ts.CreateTerrain(@"C:\test\A0.dem", @"C:\test\a.jpg", 411670, 137081, 423000, 147000);



        '测试图像部分

        'Image3DNode i3n = new Image3DNode("3dimage");
        'ts.AddNode(i3n);

        'Image2DNode i2n = new Image2DNode("2dimage");
        'ts.AddNode(i2n);


        Dim tn As TerrainNode = New TerrainNode("dem")
        Dim ti As TerrainInfo = tn.InitByDem("c:\fffffff.dem")


        'tn.SetTextureCoord(416670, 140081, 423000, 147000)

        'tn.SetTextureFromImage("C:\test\meinv.jpg")


        'vtkImageData img=DataSource.GetImageFromGrid();

        'tn.SetTextureFromGridImage(img);




        ts.AddNode(tn)


        'CPSphere cs = new CPSphere(ti, 413579, 137888, 100, Color.Red);
        'SphereNode sNode = new SphereNode(cs,"sphere");
        'ts.AddNode(sNode);



        'CPCylinder cp = new CPCylinder(ti, 412579, 137800, 50, 1000, Color.Green);
        'CylinderNode cn = new CylinderNode(cp, "yuanzhu1");
        'ts.AddNode(cn);




        'DPoint[] dps=new DPoint[]{new DPoint(419369, 138590), new DPoint(418579, 139890), new DPoint(420579, 139800),new DPoint(421999,140555) };

        'CPTubeLine pl = new CPTubeLine(ti,300,6,Color.BurlyWood ,dps);

        'TubeLineNode tln = new TubeLineNode(pl,"tubeline");
        'ts.AddNode(tln);





        FuEngine.GetEngine().Run()

    End Sub
End Class